<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title><!--装机单--></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/ui-base.css">
<link rel="stylesheet" href="css/ui-box.css">
<link rel="stylesheet" href="css/project/style.css">
<link rel="stylesheet" href="css/zv_common.css">
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
<script src="js/zy_json.js"></script>
<script src="js/main.js"></script>
<script src="js/init.js"></script>
<script type="text/javascript" src="js/JsonSQL/jsonsql-0.1.js"></script>
<script src="js/talkingdata.js"></script>
<script>
        window.uexOnload=function(type){
            if(!type){
                uexWindow.setBounce("0");
            }
        }
</script>
<style>
    body{ background:#fffff;}
    .fightlistl{ background-image:url(images/logo4-1.png); background-size:50%; margin-top:-4.5em; }
    .fightlistr ul { list-style:none; line-height:1.2em; }
    .fightlistfont1{ font-weight:bold; color:#2e2e2e; font-size:1em}
    .fightlistfont2{ color:#5a5a5a; font-size:0.8125em}
    .fightlistfont3{ color:#ae5255; font-size:0.8125em}
    .fightlistfont4{ color:#a2a2a2; font-size:0.8125em}
    .fightlistfont5{ color:#003079; }

    .fightlistfont7{ border-bottom:1px solid  #003079;}
    .fightli{ height:1.6em; line-height:0.8em; width:100%;}
    .fightli1{ height:1.4em; line-height:1.4em; width:100%;}
    .circle {width:14px;height:14px;border:1px #a0a3a6 solid;-webkit-border-radius:10px; margin:0.4em 0.2em;}
    .fightli2{ width:5.6em;}
    .fightli3{ height:3em; line-height:1.4em; width:100%;}
    .font_w{ width:3em;}
    
    .content{font-size:0.925em; background-color:#FFF; border-bottom:1px solid #CCC; border-top:1px solid #CCC; margin-top:0.5em }
    .content_left{height:3.6em; line-height:3.6em; padding-left:0.5em }
    .content_right{height:3.6em; line-height:1.8em; padding-right:0.5em}
</style>
</head>
<body class="um-vp c-wh2" ontouchstart>
<div class="ub ub-ver" id="body_content" >
    <div style="height:0.5em"></div>
    <div id="installed_list">
    </div>
</div>
<div style="height:0.5em"></div>
</body>
<script>
zy_init();
window.uexOnload=function(type){ 
    installed_list()
    //Loading(0);
    if(!type){
        uexWindow.setBounce("0");
        IC.talkingDataCount("装机单","0020");
    }
    installed_list()
}
function installed_list(){
    var jsonmodels_list = localStorage.getItem("jsonmodels_list")
    var jsonmodelsdata = strToJson(jsonmodels_list)
    var dataList=jsonmodelsdata[0].dataList
    var pdate=localStorage.getItem("backup_pdate_zjd");
    var strx=''
    for(var i=0; i<dataList.length;i++)
    {
        var planDeptTime=dataList[i].planDeptTime;
        var planArrTime=dataList[i].planArrTime;
        var planDept=''
        var planDept_data=''
        if(planDeptTime!="" && planDeptTime!=" "&& planDeptTime!="undefined" && planDeptTime!=undefined)
        {
            planDept= planDeptTime.split(" "); 
            planDept_data=planDept[0]
            planDept=planDept[1]
            planDept=planDept.split(":"); 
            planDept=planDept[0]+":"+planDept[1]
        }
        var planArr=''
        if(planArrTime!="" && planArrTime!=" "&& planArrTime!="undefined" && planArrTime!=undefined)
        {
            planArr= planArrTime.split(" "); 
            planArr=planArr[1]
            planArr=planArr.split(":"); 
            planArr=planArr[0]+":"+planArr[1]
        }
        
                    strx += '<div class="ub ubb fightlistfont7" ontouchstart="zy_touch(\'zvbtn-act\')" onclick="installed_single_models(\''+dataList[i].carrier+'\',\''+dataList[i].flightNo+'\',\''+pdate+'\',\''+dataList[i].deptAirport+'\',\''+dataList[i].arrAirport+'\')">'
                    strx += '<div class="umw2 fightlistl ub-img"></div>'
                    strx += '<div class="ub-f1 ub">'
                    strx += '<ul class="ub-pc">'
                    strx += '<li class="ub ub-ac fightli">'
                    strx += '<div class="umw4 fightlistfont1">'+dataList[i].carrier+dataList[i].flightNo+'</div>'
                    strx += '<div class="ub-f1 fightlistfont2">'
                    strx += '<div style=" width:11em;">'+dataList[i].AC_TYPE+'</div>'
                    strx += '</div>'
                    strx += '<div class="umw4 fightlistfont3 umar-r">'+planDept_data+'</div>'
                    strx += '</li>'
                    strx += '<li class="ub ub-ac fightli1">'
                    strx += '<div class="umw4 fightlistfont2 ulev-1 tx-c"  style="width:22%">'+dataList[i].deptAirportDisp+'</div>'
                    strx += '<div style="width:56%">'
                    strx += '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="10%" align="center"><div class="circle"></div></td><td  width="90%" align="center"><div style=" height:0.1em; width:100%; border-bottom:1px dotted #a0a3a6;"></div></td><td width="10%" align="center"><div class="circle"></div></td></tr></table>'
                    strx += '</div>'
                    strx += '<div class="umw4 fightlistfont2 ulev-1 tx-c"  style="width:22%" >'+dataList[i].arrAirportDisp+'</div>' 
                    strx += '</li>'
                    strx += '<li  class="ub ub-ac fightli3">'
                    strx += '<div class="umw4 fightlistfont4 ulev-1 ub ub-ver">'
                    strx += '<div class="tx-c"><span class="fightlistfont5">'+dataList[i].deptAirport+'</span></div>'
                    strx += '<div>计飞 '+planDept+'</div>'
                    strx += '</div>'
                    strx += '<div class="ub ub-f1 fightlistfont2 ub  tx-c">'
                    strx += '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td  align="center"><div style=" height:2em; width:33%; line-height:2em; padding:0.5em width:4em; border:1px solid #3fa33f;text-align:center;">飞往</tr></td></div></table>'
                    strx += '</div>'
                    strx += '<div class="tx-l fightli2 fightlistfont4 ulev-1 ub ub-ver">'
                     strx += '<div class="tx-c"><span class="fightlistfont5">&nbsp;'+dataList[i].arrAirport+'</span></div>'
                    strx += '<div>计到'+planArr+'</div>'
                    strx += '</div>'
                    strx += '</li>'
                    strx += '</ul>'
                    strx += '</div>'
                    strx += '</div>'    
//      strx+='<table width="100%" border="0" cellspacing="0" cellpadding="0" class="content"  ontouchstart="zy_touch(\'zv-btn-act\')"  onclick="LoadDataS(\''+dataList[i].carrier+'\',\''+dataList[i].flightNo+'\',\''+pdate+'\',\''+dataList[i].deptAirport+'\',\''+dataList[i].arrAirport+'\')">'
//      strx+='<tr>'
//      strx+='<td width="30%" class="content_left">'+dataList[i].carrier+dataList[i].flightNo+'</td>'
//      strx+='<td style="height:3.6em;line-height:1.8em;" align="center">'+dataList[i].deptAirportDisp+'-'+dataList[i].arrAirportDisp+'<br/>'+dataList[i].deptAirport+'-'+dataList[i].arrAirport+'</td>'
//      strx+='<td width="30%" class="content_right"  align="right">'+planDept+'<br/>'+planArr+'</td>'
//      strx+='</tr>'
//      strx+='</table>'
    }
    $$("installed_list").innerHTML=strx;
    //Loading(-1);
}
function LoadDataS(carrier,flightNo,pdate,dept,arr,depttime){
                //IC.talkingDataCount("装机单","0020");
                //Loading(0);
                // $.getJSON(host_address_url + "MachineSoap?RequestKey=" + RequestKey + "&UserName=CARGO&Password=c7b8f695039f2db66bf00285e15eb8f3&id=IPW_FL_GETELCLOADSHEET&carrier=" + carrier + "&flight_no=" + flightNo + "&flight_date=" + pdate + "&dep_airport=" + dept + "&arr_airport=" + arr + "&version=&URL=" + installed_single_url, function(json){
                // if (json == '') {
                      // $alert("暂无数据")
                     // // Loading(-1);
                // }
                // else {
                      // var json = JSON.stringify(json)
                      // localStorage.setItem("zvData", json);
                      // alert("xxxxxxxxxxxxx"+json);
                      // console.log("xxxxxxxxxxxxx"+json);
                      // openNewWin('installed_single_search_result', 'installed_single_search_result.html'); 
                // }
               // })
               //alert(carrier+"--"+flightNo+"--"+depttime);//encodeURIComponent
               //var Urllb="http://mumobiletest30.ceair.com:8011/11206260/public/QBMessage/DFgetGenXjdDetails?carrier=MU&flightNo=5516&planDeptTime=2016-05-26%2007:45:00"
               depttime=depttime.split(" ");
               depttime=depttime[0].split("/")[0]+"-"+depttime[0].split("/")[1]+"-"+depttime[0].split("/")[2]+" "+depttime[1];
               var Urllb="http://mumobiletest30.ceair.com:8011/11206260/public/QBMessage/DFgetGenXjdDetails?carrier="+carrier+"&flightNo="+flightNo+"&planDeptTime="+depttime+""
               $.getJSON(Urllb, function(json){
                if (json == '') {
                      $alert("暂无数据")
                     // Loading(-1);
                }
                else {
                      var json = JSON.stringify(json)
                      localStorage.setItem("zvData", json);
                      console.log("xxxxxxxxxxxxx"+json);
                      openNewWin('installed_single_search_result', 'installed_single_search_resultX.html'); 
                }
               })
            }
 function installed_single_models(carrier, flightNo, pdate, dept, arr){
                localStorage.setItem("installed_carrier",carrier);
                localStorage.setItem("installed_flightNo",flightNo);
                localStorage.setItem("installed_pdate",pdate);
                localStorage.setItem("installed_dept",dept);
                localStorage.setItem("installed_arr",arr);
                var wsdl = installed_single_models_url
                var nameSpace = installed_single_models_nameSpace
                var paras = "loginSystem|flightDate|flightNo|departure|arrival|carrier";
                var values = 'ceaMG|' + pdate + '|' + flightNo + '|' + dept + '|' + arr + '|' + carrier;
                var method = installed_single_models_function
                var jsonPage = [{'key': 'wsdl','type': '0', 'value': wsdl}, {'key': 'KEY1','type': '0','value': '1'}, {'key': 'KEY2','type': '0','value': '1'}, {'key': 'KEY3','type': '0','value': '1'}, {'key': 'nameSpace','type': '0','value': nameSpace}, {'key': 'method','type': '0','value': method}, {'key': 'paras','type': '0','value': paras}, {'key': 'values','type': '0','value': values}];
                $.getJSON(UrlClient + "&SOAPType=yes", function(json){
                    var depttime=json[0].dataList[0].planDeptTime;
                    var jsonmodels = JSON.stringify(json);
                    //alert(jsonmodels);
                    localStorage.setItem("jsonmodels", jsonmodels);
                    console.log("LBBBBBBBBBBB"+jsonmodels); 
                    //Loading(-1);
                    LoadDataS(carrier, flightNo, pdate, dept, arr,depttime)
                }, "json", function(e){
                }, "POST", jsonPage, false); 
                }
///////////////////////////////////////////////////////////////////一分钟刷新一次
function LoadDataSreload(carrier, flightNo, pdate, dept, arr){
    $.getJSON(host_address_url + "MachineSoap?RequestKey=" + RequestKey + "&UserName=CARGO&Password=c7b8f695039f2db66bf00285e15eb8f3&id=IPW_FL_GETELCLOADSHEET&carrier=" + carrier + "&flight_no=" + flightNo + "&flight_date=" + pdate + "&dep_airport=" + dept + "&arr_airport=" + arr + "&version=&URL=" + installed_single_url, function(json){
        if (json == '') {
            $alert("暂无数据")
        }
        else {
            var json = JSON.stringify(json)
            
            localStorage.setItem("zvDatareload", json);
            ueppscript("installed_single_search_result","content","installed_single_v()");
        }
    })
}   
///////////////////////////////////////////////////////////////////一分钟刷新一次  

///////////////////////////////////////////////////////////////////版本选择
function LoadDataversion(carrier, flightNo, pdate, dept, arr,version){
    IC.talkingDataCount("装机单","0020");
    if(version==undefined||version=='undefined'||version==null||version=='null')
    {
        version=''
    }
    $.getJSON(host_address_url + "MachineSoap?RequestKey=" + RequestKey + "&UserName=CARGO&Password=c7b8f695039f2db66bf00285e15eb8f3&id=IPW_FL_GETELCLOADSHEET&carrier=" + carrier + "&flight_no=" + flightNo + "&flight_date=" + pdate + "&dep_airport=" + dept + "&arr_airport=" + arr + "&version="+version+"&URL=" + installed_single_url, function(json){
        if (json == '') {
            $alert("暂无数据")
        }
        else {
            var json = JSON.stringify(json)
            localStorage.setItem("zvDataversion", json);
            ueppscript("installed_single_search_result","content","installed_version()");
        }
    })
}   
///////////////////////////////////////////////////////////////////版本选择 

</script>
</html>
